<?php

namespace App;

use Illuminate\Database\Eloquent\Model;

class AdminPermission extends Model
{
    //权限属于角色
    public function role()
    {
        return $this->belongsToMany("App\AdminRole","admin_permission_role","permission_id","role_id")->withPivot(["role_id","permission_id"]);
    }
}
